<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
 <head>
  <title>Json schema example</title>


	<!-- YUI CSS -->
	<link rel="stylesheet" type="text/css" href="../lib/yui/reset-fonts/reset-fonts.css">
	<link rel="stylesheet" type="text/css" href="../lib/yui/container/assets/container.css"> 
	<link rel="stylesheet" type="text/css" href="../lib/yui/assets/skins/sam/skin.css">

	<!-- InputEx CSS -->
	<link type='text/css' rel='stylesheet' href='../css/inputEx.css' />

<style>

#formContainer {
	margin:40px auto;
	width: 80%;
	background-color: #ccccff;
	padding: 20px;
}

#formContainer .yui-editor-container {
	width: 70%;
}

</style>

 </head>

<body class="yui-skin-sam">
	
	<center>
	<div id='formContainer'></div>
	</center>
	
<!-- YUI Library -->
<script type="text/javascript" src="../lib/yui/utilities/utilities.js"></script>
<script type="text/javascript" src="../lib/yui/container/container-min.js"></script>
<script type="text/javascript" src="../lib/yui/menu/menu-min.js"></script>
<script type="text/javascript" src="../lib/yui/button/button-min.js"></script>
<script type="text/javascript" src="../lib/yui/datasource/datasource-min.js"></script>
<script type="text/javascript" src="../lib/yui/autocomplete/autocomplete-min.js"></script>
<script type="text/javascript" src="../lib/yui/editor/editor-min.js"></script>


<!-- InputEx -->
<script src="../js/inputex.js"  type='text/javascript'></script>
<script src="../js/Field.js"  type='text/javascript'></script>
<script src="../js/Group.js"></script>
<script src="../js/fields/CheckBox.js"></script>
<script src="../js/fields/StringField.js"></script>
<script src="../js/fields/ListField.js"></script>
<script src="../js/fields/Textarea.js"></script>
<script src="../js/fields/EmailField.js"></script>
<script src="../js/fields/UrlField.js"></script>
<script src="../js/fields/ColorField.js"></script>
<script src="../js/fields/DateField.js"></script>
<script src="../js/fields/SelectField.js"></script>
<script src="../js/fields/RTEField.js"  type='text/javascript'></script>
<script src="../js/json-schema.js"></script>

<!-- json schema to load -->
<script src="base-schema.js"></script>

<script>

YAHOO.util.Event.addListener(window, "load", function() {
	
	var builder = new YAHOO.inputEx.JsonSchema.Builder({
		'schemaIdentifierMap':base_schema_map,
	  'defaultOptions':{
	     'showMsg':true
	  }
  });
	var m = builder.schemaToInputEx(base_schema_map.community);
	m.inputParams.parentEl = 'formContainer';
	var f = YAHOO.inputEx(m);
	
});

</script>


 </body>
</html>